export default {
    namespaced: true,
    state() {
        return {
            // 歌单id
            songListId: localStorage.getItem("song_list_id"),
            // 歌单所有歌曲
            songListData: JSON.parse(localStorage.getItem("song_list_data")) || "{}"
        }
    },
    mutations: {
        // 更改歌单id
        updateSongListId(state, id) {
            state.songListId = id
            localStorage.setItem("song_list_id", state.songListId)
        },
        updateSongListData(state, data) {
            state.songListData = data
            localStorage.setItem("song_list_data", JSON.stringify(state.songListData))
        }
    }
}